package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.example.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 用户Mapper接口
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    
    /**
     * 根据手机号和用户类型查询用户
     */
    @Select("SELECT * FROM users WHERE phone = #{phone} AND user_type = #{userType}")
    User selectByPhoneAndUserType(@Param("phone") String phone, @Param("userType") String userType);
}
